﻿Imports ESRI.ArcGIS.Geodatabase
Imports ESRI.ArcGIS.Geometry

Public Class LineForm
    Public Sub setGeometry(ByVal geometry As IGeometry)
        If geometry IsNot Nothing And TryCast(geometry, IPolyline) IsNot Nothing Then
            Dim curve As ICurve = geometry
            longueur.Text = curve.Length
            unitLong.Text = "kilomètres"
            xmax.Text = geometry.Envelope.XMax
            ymax.Text = geometry.Envelope.YMax
            xmin.Text = geometry.Envelope.XMin
            ymin.Text = geometry.Envelope.YMin
        End If
    End Sub
End Class
